<script>
import {
  Message,
} from '@element-plus/icons-vue'
//import { ElMessage, ElMessageBox } from 'element-plus'
export default {
  components:{
    Message
  },
  computed:{
    Message(){
      return Message
    }
  },
  data(){
    return  {
      tableData:[],
      StateOr:false,
      form:{
        order_state:[],
        order_id:0,
      },
      formLabelWidth:'120 px',
    }
  },
  methods:{
    LoadFinishingShipmentData(){
      this.$http.get("http://localhost:8080/order/FinishingShipment").then((res)=>{
        this.tableData = res.data;
        console.log(this.tableData)
      }).catch(function (err) {
        console.log(err);
      })
    }
  },
  mounted() {
    this.LoadFinishingShipmentData();
  }
}
</script>

<template>
  <el-card style="max-width:100%">
    <template #header>
      <div class="card-header">
        <span>已完成</span>
      </div>
    </template>
    <el-table :data="tableData" height="500" style="width: 100%">
      <el-table-column prop="order_id" label="订单编号" width="80" />
      <el-table-column prop="goods_image" label="商品图片" width="180">
        <template #default="{ row }">
          <img v-if="row.goods_image"
               :src="`http://localhost:8080/image/upload/${row.goods_image}`"
               alt="goods_image"
               style="width: 100%; height: auto;">
        </template>
      </el-table-column>
      <el-table-column prop="goods_description" label="商品介绍" width="180" />
      <el-table-column prop="count" label="购买数量" width="80" />
      <el-table-column prop="goods_price" label="单价" width="80" />
      <el-table-column prop="subtotal" label="实际支付" width="80" />
      <el-table-column prop="shipping_address" label="发货地址" width="100" />
      <el-table-column prop="delivery_address" label="收货地址" width="100" />
      <el-table-column fixed="right" label="操作" width="270">

        <template #default="scope">
          <!--自定义内容 在template内加上#default-->
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<style >

</style>